import fetch from '@/utils/fetch';

export const startCrawler = (data) =>
  fetch('/api/xiaohongshu/startCrawler', {
    method: 'post',
    data: data,
  });

export const publish = (data) =>
  fetch('/api/xiaohongshu/publish', {
    method: 'post',
    data: data,
  });

export const uploadImg = async (data) => {
  return await fetch('/api/xiaohongshu/uploadImg', {
    method: 'post',
    data: data,
  });
};

export const chatWithAi = async (data) => {
  return await fetch('/api/xiaohongshu/chatWithAi', {
    method: 'post',
    data: data,
  });
};
